package designpatterns.templetemethod;

/**
 * @author miweidong
 * @date 2021-07-28 13:48
 */
public abstract class TemplateMethod {

    protected void step1() {
        System.out.println("执行step1");
    }

    protected void step3() {
        System.out.println("执行step3");
    }

    protected void step5() {
        System.out.println("执行step5");
    }

    abstract void step2();

    abstract void step4();

    public void run() {
        step1();
        step2();
        step3();
        step4();
        step5();
    }
}
